home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 32
/
Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso
/
Aminet
/
dev
/
lang
/
Python152.lha
/
Python-1.5
/
Demo
/
sockets
/
radio.py
< prev
next >
Wrap
Text File
|
1994-10-08
|
274b
|
15 lines
# Receive UDP packets transmitted by a broadcasting service
MYPORT = 50000
import sys
from socket import *
s = socket(AF_INET, SOCK_DGRAM)
s.bind(('', MYPORT))
while 1:
data, wherefrom = s.recvfrom(1500, 0)
sys.stderr.write(`wherefrom` + '\n')
sys.stdout.write(data)